1862 import APH file in read_cropreporter#1906
Conversation
switch aph import to numpy instead of an xarray
Wrap debug in xarray so that the debug can have titles for the frames
|
|
Overall Grade |
Security Reliability Complexity Hygiene Coverage |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Python | May 4, 2026 8:43p.m. | Review ↗ | |
| Code coverage | May 4, 2026 8:43p.m. | Review ↗ |
Code Coverage Summary
| Language | Line Coverage (New Code) | Line Coverage (Overall) |
|---|---|---|
| Aggregate | 100% [✓ above threshold] |
99.9% [▼ down 0.1% from main] |
| Python | 100% [✓ above threshold] |
99.9% [▼ down 0.1% from main] |
➟ Additional coverage metrics may have been reported. See full coverage report ↗
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
|
@deepsourcebot review |
There was a problem hiding this comment.
Pull request overview
Updates CropReporter APH ingestion so APH data is stored as a NumPy array (Red/FarRed only) rather than an xarray DataArray, aligning it with other NumPy-based protocol outputs and simplifying downstream analysis.
Changes:
- Convert APH import from xarray DataArray to a 3D NumPy array containing only the Red and FarRed frames.
- Add an xarray wrapper only for debug plotting so frame labels render in debug output.
- Update the APH screenshot filename reference in the documentation.
Reviewed changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
plantcv/plantcv/photosynthesis/read_cropreporter.py |
Changes APH parsing/storage to NumPy and adjusts debug visualization accordingly. |
docs/photosynthesis_read_cropreporter.md |
Updates APH screenshot reference in docs to match the new filename. |
docs/img/documentation_images/photosynthesis_read_cropreporter/6_aph_frames.png |
Asset presence in PR context; documentation reference now points to 6_APH-frames.png. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Based on copilot suggestion
Used monkeypatch to test a scenario for less APH frames
Do not use pytest
Describe your changes
APH file types were previously imported as xarray, and are now converted as numpy in order to match styles and provide ease of downstream analysis.
Type of update
Is this a:
Associated issues
Issue 1862
For the reviewer
See this page for instructions on how to review the pull request.
plantcv/mkdocs.ymlupdating.md